package com.gec.it.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gec.it.dao.BaseMapper2;
import com.gec.it.service.IService2;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.util.List;

public class ServiceImpl2<M extends BaseMapper2<T>, T>
        extends ServiceImpl<M,T> implements IService2<T> {

    private M baseMapper2;
    @Autowired
    public void setBaseMapper2(M baseMapper2) {
        this.baseMapper2 = baseMapper2;
    }
    @Override
    public T getById2(Serializable id) {
        return baseMapper2.selectById2(id);
    }

    @Override
    public T getOne2(Wrapper<T> queryWrapper) {
        return baseMapper2.selectOne2(queryWrapper);
    }

    @Override
    public int count2(Wrapper queryWrapper) {
        return baseMapper2.selectCount2(queryWrapper);
    }

    @Override
    public List list2(Wrapper queryWrapper) {
        return baseMapper2.selectList2(queryWrapper);
    }

    @Override
    public List list2() {
        return baseMapper2.selectAll2();
    }

    @Override
    public IPage page2(IPage page, Wrapper queryWrapper) {
        return baseMapper2.selectPage2(page,queryWrapper);
    }
}
